<?php
namespace app\api\model;

use app\common\model\Activity as ActivityModel;

/**
 * 首页活动模型
 * Class Banner
 * @package app\api\model
 */
class Activity extends ActivityModel
{
    /**
     * 获取首页活动
     * @return bool|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public static function getList()
    {
        return static::with(['image'])
            ->where('is_delete', '=', 0)
            ->where('activity_status', '=', 1)
            ->order(['activity_id' => 'desc'])
            ->find();

    }
}